public class Cylinder
{
    double radius;
    double height;
     public void squaring(){
         double s;
         s=2*radius*3.14*height+2*radius*radius*3.14;
        System.out.println("圆柱的表面积为："+s);
     }
      public void cube(){
         double v=radius*radius*3.14*height;
         System.out.println("圆柱的体积为："+v);
      }

    public static void main(String[] args) {
        Cylinder  c = new Cylinder();
        c.radius = 20 ;
        c.height = 20 ;
        c.squaring() ; // 计算圆柱体表面积并在控制台输出面积
        c.cube() ; // 计算圆柱体体积并在控制台输出体积
    }
}
